package com.zw.service;

import com.zw.dao.PersistantDao;
import com.zw.model.GirlPO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * Created by xlinux on 2017/7/6.
 */

@Service
public class GirlService {
    @Autowired
    private PersistantDao persistantDao;
    @Transactional
    public void saveDouble(){
        GirlPO a = new GirlPO();
        a.setAge(20);
        a.setCupSize("C");
        GirlPO b = new GirlPO();
        b.setAge(30);
        b.setCupSize("DD");

        persistantDao.save(a);
        persistantDao.save(b);
    }
}
